package com.ygqh.baby.mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.ActionOrder;
import com.ygqh.baby.po.ActionOrderExample;

public interface ActionOrderMapper {
	int countByExample(ActionOrderExample example);

	int deleteByExample(ActionOrderExample example);

	int deleteByPrimaryKey(Long id);

	int insert(ActionOrder record);

	int insertSelective(ActionOrder record);

	List<ActionOrder> selectByExample(ActionOrderExample example);

	ActionOrder selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") ActionOrder record, @Param("example") ActionOrderExample example);

	int updateByExample(@Param("record") ActionOrder record, @Param("example") ActionOrderExample example);

	int updateByPrimaryKeySelective(ActionOrder record);

	int updateByPrimaryKey(ActionOrder record);

	int countSuper(@Param("q") String q);

	List<ActionOrder> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q);

	List<Map<String, Object>> selectSalesReportWithProductInfo(@Param("actionId") Long actionId, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

	List<Map<String, Object>> selectSalesReportALL(@Param("actionId") Long actionId);

	int updateOrderStatusByPaySuccess(@Param("orderId") String orderId);

	ActionOrder selectByOrderId(@Param("orderId") String orderId);

	List<ActionOrder> selectOrderList(@Param("actionId") Long actionId, @Param("userId") Long userId, @Param("orderStatus") String orderStatus);

	int updateOrderToClose(@Param("idList") List<Long> idList);

	Map<String, Object> selectSalesReportWithOrderInfo(@Param("actionId") Long actionId, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

}
